﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace nwrole.plugin
{
    public class PluginError
    {
        public string Origin { get; private set; }
        public string Message { get; private set; }
        public DateTime Occurred { get; private set; }
        public Dictionary<string, object> Information { get; set; }
        public Exception Exception { get; set; }

        public PluginError(string origin, string message)
        {
            Origin = origin;
            Message = message;
            Occurred = DateTime.Now;
            Information = new Dictionary<string, object>();
        }

        public PluginError(string origin, string message, Exception exception)
            : this(origin, message)
        {
            Exception = exception;
        }
    }
}
